package com.fileshare.web.dto.Vo;

import com.fileshare.web.entity.User;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.beans.BeanUtils;

@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class UserVo {
    private String userName;
    private String userSeq;
    private String avatar;
    private Integer joinCont;

    public static UserVo fromEntity(User user) {
        UserVo userVo = new UserVo();
        BeanUtils.copyProperties(user, userVo);
        return userVo;
    }
}
